package com.example.friend.rabbitmq;


import com.example.core.constants.RabbitMQConstants;
import jakarta.annotation.Resource;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

@Component
public class JudgeProducer {

    @Resource
    private RabbitTemplate rabbitTemplate;

    public void produceJudgeMsg(String message) {
        rabbitTemplate.convertAndSend(RabbitMQConstants.DIRECT_EXCHANGE_NAME,
                RabbitMQConstants.DIRECT_JUDGE_ROUTE_KEY, message);
    }
}
